import pygame


class Grid:
    def __init__(self, size, position, color):
        self.size = size
        self.x, self.y = position
        self.color = color

    def draw(self, screen):
        pygame.draw.rect(screen, self.color, [self.x+1, self.y+1, self.size-2, self.size-2])

    def changeColor(self, color):
        self.color = color